.class public Les/s40;
.super Ljava/io/InputStream;
.source "SmbInputStream.java"


# instance fields
.field private a:Ljcifs/smb/SmbRandomAccessFile;

.field private b:J

.field private c:J


# direct methods
.method public constructor <init>(Ljcifs/smb/SmbRandomAccessFile;J)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/io/InputStream;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    const-wide/16 v0, 0x0

    .line 3
    iput-wide v0, p0, Les/s40;->b:J

    .line 4
    iput-wide v0, p0, Les/s40;->c:J

    .line 5
    iput-object p1, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    .line 6
    iput-wide p2, p0, Les/s40;->b:J

    return-void
.end method


# virtual methods
.method public close()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    invoke-virtual {v0}, Ljcifs/smb/SmbRandomAccessFile;->close()V

    .line 2
    invoke-super {p0}, Ljava/io/InputStream;->close()V

    return-void
.end method

.method public read()I
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 9
    iget-wide v0, p0, Les/s40;->b:J

    iget-wide v2, p0, Les/s40;->c:J

    sub-long/2addr v0, v2

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_0

    const/4 v0, -0x1

    return v0

    .line 10
    :cond_0
    iget-object v0, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    invoke-virtual {v0}, Ljcifs/smb/SmbRandomAccessFile;->read()I

    move-result v0

    if-ltz v0, :cond_1

    .line 11
    iget-wide v1, p0, Les/s40;->c:J

    const-wide/16 v3, 0x1

    add-long/2addr v1, v3

    iput-wide v1, p0, Les/s40;->c:J

    :cond_1
    return v0
.end method

.method public read([B)I
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 8
    array-length v0, p1

    const/4 v1, 0x0

    invoke-virtual {p0, p1, v1, v0}, Les/s40;->read([BII)I

    move-result p1

    return p1
.end method

.method public read([BII)I
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-wide v0, p0, Les/s40;->b:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-nez v4, :cond_1

    .line 2
    iget-object v0, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    invoke-virtual {v0, p1, p2, p3}, Ljcifs/smb/SmbRandomAccessFile;->read([BII)I

    move-result p1

    if-ltz p1, :cond_0

    .line 3
    iget-wide p2, p0, Les/s40;->c:J

    int-to-long v0, p1

    add-long/2addr p2, v0

    iput-wide p2, p0, Les/s40;->c:J

    :cond_0
    return p1

    .line 4
    :cond_1
    iget-wide v4, p0, Les/s40;->c:J

    sub-long/2addr v0, v4

    cmp-long v4, v0, v2

    if-nez v4, :cond_2

    const/4 p1, -0x1

    return p1

    :cond_2
    int-to-long v2, p3

    cmp-long v4, v2, v0

    if-gez v4, :cond_3

    .line 5
    iget-object v0, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    invoke-virtual {v0, p1, p2, p3}, Ljcifs/smb/SmbRandomAccessFile;->read([BII)I

    move-result p1

    goto :goto_0

    .line 6
    :cond_3
    iget-object p3, p0, Les/s40;->a:Ljcifs/smb/SmbRandomAccessFile;

    long-to-int v1, v0

    invoke-virtual {p3, p1, p2, v1}, Ljcifs/smb/SmbRandomAccessFile;->read([BII)I

    move-result p1

    :goto_0
    if-ltz p1, :cond_4

    .line 7
    iget-wide p2, p0, Les/s40;->c:J

    int-to-long v0, p1

    add-long/2addr p2, v0

    iput-wide p2, p0, Les/s40;->c:J

    :cond_4
    return p1
.end method
